home *** CD-ROM | disk | FTP | other *** search
- Path: hermes.ucd.ie!usenet
- From: <>
- Newsgroups: comp.lang.c++,comp.lang.c
- Subject: Re: Include C++ in C programs
- Date: 21 Mar 1996 14:57:39 GMT
- Organization: University College Dublin
- Message-ID: <4irqp3$2lv@hermes.ucd.ie>
- References: <ε▓|>
- NNTP-Posting-Host: online.ucd.ie
-
- roberto canales <rcanales@sag.es> writes:
- > Glandrup M.H.J. wrote:
- >
- >
- > > Hello,
- > >
- > > Is there anybody who knows how to call C++ member functions in a
- > > C program?
- > > If it is not possible, please tell me...
- >
- >
- >
- > You can declare the C++ function prototype whitch prefix:
- >
- > extern "C"
- >
- > bye.
- >
- > Roberto Canales
- > rcanales@sag.es
-
- The original question is in the FAQ the answer isn't, because it is wrong.
-
- The solution will work fine if they are static member functions but
- won't work if they are ordinary member functions. Ordinary member
- functions can't be called from C, as they take this as their first argument. this is a pointer to a class, something that C doesn't understand.
-
-
-